//
//  CNSearchFlowLayout.m
//  BeeQuick_19
//
//  Created by whong7 on 16/9/23.
//  Copyright © 2016年 CN Team. All rights reserved.
//

#import "CNSearchFlowLayout.h"

@implementation CNSearchFlowLayout

- (void)prepareLayout
{
    // 一定要去调用父类方法
    [super prepareLayout];
    
    CGFloat w = (self.collectionView.bounds.size.width-30) / 2;
    CGFloat h = 250;
    self.itemSize = CGSizeMake(w, h); // cell大小
    self.minimumLineSpacing = 10; // 行间距
    self.minimumInteritemSpacing = 10; // cell间距
    self.sectionInset = UIEdgeInsetsMake(10, 10, 10, 10);
    // 是否固定组头(悬停)
    self.sectionHeadersPinToVisibleBounds = NO;
    
    //设置头部高度
    self.headerReferenceSize = CGSizeMake(self.collectionView.bounds.size.width, 40);

    self.scrollDirection = UICollectionViewScrollDirectionVertical; // 设置水平滑动
}

@end
